import {createAsyncThunk,createSlice} from '@reduxjs/toolkit'
import * as services from 'services/Consultationinformation/Doctorchat'
import { addBuilder } from 'store/dict'

export const doDoctorchat = createAsyncThunk<any,any>(
    'Doctorchat/doDoctorchat',
    async(data)=>{
        console.log(data);
        
        const res = await services.Doctorchats(data)
        return res
    }
)


const initialState = {
    Doctorchat:{}
}


const DoctorchatChart = createSlice({
    name:"Doctorchat",
    initialState,
    reducers:{},
    extraReducers:(builder)=>{
        addBuilder(builder,doDoctorchat,(state,action)=>{
            console.log(action);
            
        })
    }
})

export default DoctorchatChart.reducer
